<div class="account-menu">

    <h2 <?php if($tab_first == 'account'){?>class="selected"<?php }?> ><a href="javascript:void(0);">我的账户</a></h2>

    <ul class="account-submenu">
        <li <?php if($tab_second == 'account_base'){?>class="current"<?php }?> ><a href="/user/info/index.html">基础信息</a></li>
        <li <?php if($tab_second == 'account_auth'){?>class="current"<?php }?> ><a href="/user/realname/index.html">认证信息</a></li>
        <li <?php if($tab_second == 'account_safe'){?>class="current"<?php }?> ><a href="/user/user_safe.html">安全信息</a></li>
        <li <?php if($tab_second == 'account_vip'){?>class="current"<?php }?> ><a href="/user/vip/index.html">VIP信息</a></li>
<!--        <li><a href="/">账户设置</a></li>-->
    </ul>

    <h2 <?php if($tab_first == 'fund'){?>class="selected"<?php }?> ><a href="javascript:void(0);">资金管理</a></h2>

    <ul class="account-submenu">
        <li <?php if($tab_second == 'fund_deal'){?>class="current"<?php }?> ><a href="/account/details.html">交易记录</a></li>
        <li <?php if($tab_second == 'fund_overview'){?>class="current"<?php }?> ><a href="/account/info.html">资金总览</a></li>
        <li <?php if($tab_second == 'fund_recharge'){?>class="current"<?php }?> ><a href="/account/recharge.html">账户充值</a></li>
        <li <?php if($tab_second == 'fund_withdraw'){?>class="current"<?php }?> ><a href="/account/cash.html">账户提现</a></li>
        <li <?php if($tab_second == 'fund_bank'){?>class="current"<?php }?> ><a href="/account/bank.html">银行卡</a></li>
    </ul>

    <h2 <?php if($tab_first == 'invest'){?>class="selected"<?php }?> ><a href="javascript:void(0);">理财管理</a></h2>

    <ul class="account-submenu">
        <li <?php if($tab_second == 'invest_mine'){?>class="current"<?php }?> ><a href="/userborrow/success.html">我的投资</a></li>
        <li <?php if($tab_second == 'invest_transfer'){?>class="current"<?php }?> ><a href="/userborrow/transferlog.html">债权转让</a></li>
<!--        <li><a href="/">理财统计</a></li>-->
        <li <?php if($tab_second == 'invest_auto'){?>class="current"<?php } ?> ><a href="/borrowauto/alist.html">自动投标</a></li>
    </ul>

    <h2 <?php if($tab_first == 'borrow'){?>class="selected"<?php }?> ><a href="javascript:void(0);">借款管理</a></h2>

    <ul class="account-submenu">
        <li <?php if($tab_second == 'borrow_mine'){?>class="current"<?php } ?> ><a href="/userborrow/publish.html">我的借款</a></li>
<!--        <li --><?php //if($tab_second == 'borrow_limit'){?><!--class="current"--><?php //} ?><!-- ><a href="/amount.html">额度申请</a></li>-->
        <li <?php if($tab_second == 'borrow_material'){?>class="current"<?php } ?> ><a href="/credentials/all.html">资料证明</a></li>
<!--        <li><a href="/">借款统计</a></li>-->
    </ul>

    <h2 <?php if($tab_first == 'interact'){?>class="selected"<?php }?> ><a href="javascript:void(0);">互动管理</a></h2>
    <ul class="account-submenu">
        <li <?php if($tab_second == 'interact_siteMsg'){?>class="current"<?php } ?> ><a href="/message/received.html">站内消息</a></li>
        <li <?php if($tab_second == 'interact_message'){?>class="current"<?php } ?> ><a href="/leaveword/release.html">留言消息</a></li>
<!--        <li><a href="/">通知设置</a></li>-->
    </ul>

    <h2 <?php if($tab_first == 'recommend'){?>class="selected"<?php }?> ><a href="javascript:void(0);">好友推荐</a></h2>
    <ul class="account-submenu">
        <li <?php if($tab_second == 'recommend_friend'){?>class="current"<?php } ?> ><a href="/user/invite.html">推荐好友</a></li>
<!--        <li><a href="/">奖金记录</a></li>-->
    </ul>

    <h2 <?php if($tab_first == 'shop'){?>class="selected"<?php }?> ><a href="javascript:void(0);">积分商城</a></h2>
    <ul class="account-submenu">
        <li <?php if($tab_second == 'shop_creditDetail'){?>class="current"<?php } ?> ><a href="/shop/credit_detail.html">积分明细</a></li>
        <li <?php if($tab_second == 'shop_box'){?>class="current"<?php } ?> ><a href="/shop/credit_box.html">积分抽奖</a></li>
        <li <?php if($tab_second == 'shop_creditExchange'){?>class="current"<?php } ?> ><a href="/shop/credit_exchange.html">积分兑换</a></li>
    </ul>
</div>


<script type="text/javascript">
$(document).ready(function(){
    $(".account-menu ul").hide();
    var url = window.location.pathname;
    var h2 = $(".account-menu h2");
    var currentA = new Array();
    currentA  = $('.account-menu ul li');
    for(var i = 0; i<currentA.size();i++){
//       if($(currentA[i]).attr('href') == url){
//           $(currentA[i]).parent().addClass('current');
//           $(currentA[i]).parent().parent().show();
//       }
        if($($(currentA[i])).hasClass('current') == true) {
            $(currentA[i]).parent().show();
        }
    }
	h2.click(function(){
        $(".account-menu ul").slideUp();
        var current = $(this).next('ul');
        current.slideDown();
        h2.removeClass("selected");
        $(this).addClass("selected");
	});

});
</script>